<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>for 遍历对象</title>
</head>
<body>
<div id="app">
    <!--    -->
    <div v-for="item in person">{{ item }}</div>

    <br>

    <div v-for="(value, key) in person">{{ key }} : {{ value }}</div>

    <br>

    <div v-for="(value, key, index) in person">{{ index}}、{{ key }} : {{ value }}</div>
</div>

<script src="../../../../../js/vue.global.js"></script>
<script>
    const app = Vue.createApp({
        data() {
            return {
                person: {
                    name: "abcque",
                    age: 18,
                    gender: "男",
                }
            }
        },
        methods: {}
    })

    app.mount("#app")
</script>
</body>
</html>